<%
response.setHeader("Cache-Control", "no-cache, no-store, must-revalidate"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", -1); //prevents caching at the proxy server
%>
<% int validaSession = 2; %>
<%@ include file="Connections/session.jsp" %>

<%
//--- variables de session
//String sesLogin = (String)session.getAttribute("login");
String sesAdmonOERLG1 = (String)session.getAttribute("CIMAOPERACIOREPORTESLIQGENER1");
//out.println("<br> admon "+sesAdmonOERLG1);
String sesLecturaOERLG2 = (String)session.getAttribute("CIMAOPERACIOREPORTESLIQGENER2");
//out.println("<br> lect "+sesLecturaOERLG2);
String sesAdmonOERLA1 = (String)session.getAttribute("CIMAOPERACIOREPORTESLIQALM1");
//out..println("<br> admon "+sesAdmonOERLA1);
String sesLecturaOERLA2 = (String)session.getAttribute("CIMAOPERACIOREPORTESLIQALM2");
//out.println("<br> lect "+sesLecturaOERLA2);
String sesAdmonOERSM1 = (String)session.getAttribute("CIMAOPERACIOREPORTESSALMAIZ1");
//out..println("<br> admon "+sesAdmonOERSM1);
String sesLecturaOERSM2 = (String)session.getAttribute("CIMAOPERACIOREPORTESSALMAIZ2");
//out.println("<br> lect "+sesLecturaOERSM2);
String sesAdmonOEREM1 = (String)session.getAttribute("CIMAOPERACIOREPORTESENTMAIZ1");
//out..println("<br> admon "+sesAdmonOEREM1);
String sesLecturaOEREM2 = (String)session.getAttribute("CIMAOPERACIOREPORTESENTMAIZ2");
//out.println("<br> lect "+sesLecturaOEREM2);
String sesLecturaOERXM1 = (String)session.getAttribute("CIMAOPERACIOREPORTESEXIMAIZ1");
//out.println("<br> Admon "+sesLecturaOERXM1);
String sesLecturaOERXM2 = (String)session.getAttribute("CIMAOPERACIOREPORTESEXIMAIZ2");
//out.println("<br> Lect "+sesLecturaOERXM2);


//out.print(sesLogin);
/*
if (sesLogin == null) {
	out.print("<script>");
	out.print("window.parent.parent.location = 'login.jsp'");
	out.print("</script>");
}*/
//-------------

String parId_almac = request.getParameter("id_almac");

%>
<html>
<head>
<title>CIMA v2 - Reportes</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="miestilo.css" type="text/css">
<script>
var opcion = 0;
//------
	function cierraVentana() {
		if (window.onClick) {
			opcion = 1;
		}
		if (opcion==0) {
			window.close();
		}
	}
//-------
	function liquidacionGral(id_almac) {
		window.open('liquidacion_maiz.jsp?id_almac='+id_almac,'Reportes_LG','scrollbars=yes,status=yes,top=150,left=150,width=600,height=310')
		window.close();
	}
//-------
	function liquidacionAlm(id_almac) {
		window.open('liquidacion_maiz2.jsp?id_almac='+id_almac,'Reportes_L','scrollbars=yes,status=yes,top=150,left=150,width=600,height=220')
		window.close();
	}

//---------
	function salidas(id_almac) {
		window.open('salidas_maiz.jsp?id_almac='+id_almac,'Reportes_Salid','scrollbars=yes,status=yes,top=130,left=140,width=800,height=550')
		window.close();
	}
//-------
	function entradas(id_almac) {
		window.open('entradas_maiz.jsp?id_almac='+id_almac,'Reportes_Entr','scrollbars=yes,status=yes,top=130,left=140,width=800,height=550')
		window.close();
	}
	
	function existencias(id_almac) {
		window.open('reporte_existencias.jsp?id_almac='+id_almac,'Reportes_Exis','scrollbars=yes,status=yes,top=0,left=0,width='+(screen.width-7)+',height='+(screen.height-81))
		//window.close();
	}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" background="images/fondo.jpg">
<%
//----------------
if((sesLecturaOERLG2!=null && sesLecturaOERLG2.equals("2")) && (sesLecturaOERLA2!=null && sesLecturaOERLA2.equals("2")) && (sesLecturaOERSM2!=null && sesLecturaOERSM2.equals("2")) && (sesLecturaOEREM2!=null && sesLecturaOEREM2.equals("2"))) {
//----------------
%>
<center>
<form name="form1">
    <table width="183" border="0" cellspacing="0" cellpadding="0">
      <tr> 
        <td height="20" class="etiqueta">&#149;&nbsp;<b>Liquidaci&oacute;n de Compra 
          de Ma&iacute;z</b></td>
      </tr>
      <tr> 
        <td height="20" class="textcolumna"><% if(sesLecturaOERLG2!=null && sesLecturaOERLG2.equals("2")) { %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#149;&nbsp;<a href="javascript:liquidacionGral(document.form1.id_almac.value)"><b>General</b></a><% } %></td>
      </tr>
      <tr> 
        <td height="20" class="textcolumna"><% if(sesLecturaOERLA2!=null && sesLecturaOERLA2.equals("2")) { %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#149;&nbsp;<a href="javascript:liquidacionAlm(document.form1.id_almac.value)"><b>Por 
          Almac&eacute;n</b></a><% } %></td>
      </tr>
      <tr> 
        <td height="20" class="etiqueta"><% if(sesLecturaOERSM2!=null && sesLecturaOERSM2.equals("2")) { %>&#149;&nbsp;<a href="javascript:salidas(document.form1.id_almac.value)"><b>Salidas 
          de Ma&iacute;z</b></a><% } %></td>
      </tr>
      <tr> 
        <td height="20" class="etiqueta"> 
          <% if(sesLecturaOEREM2!=null && sesLecturaOEREM2.equals("2")) { %>&#149;&nbsp;<a href="javascript:entradas(document.form1.id_almac.value)"><b>Entradas 
        de Ma&iacute;z</b></a><% } %></td>
      </tr>
	  <tr> 
        <td height="20" class="etiqueta"> 
          <input type="hidden" name="id_almac" value="<%=parId_almac%>">
          <% if(sesLecturaOERXM2!=null && sesLecturaOERXM2.equals("2")) { %>
          &#149;&nbsp;<a href="javascript:existencias(document.form1.id_almac.value)"><b>Existencias 
        de Ma&iacute;z</b></a>
          <% } %></td>
      </tr>
    </table>
</form>
</center>
<%
//-------------
 } // fin if(sesLectura!=null && sesLectura.equals("2"))
 else {
%>
<br><br><br>
  <table width="400" cellpadding="0" cellspacing="0" border="0" align="Center">
    <tr>
      <td align="center">No tiene Permisos para ver &eacute;sta p&aacute;gina.<br>Consulte 
        a su Administrador.</td>
  </tr>
</table>
<%
 }
//-------------
%>

</body>
<HEAD>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
</HEAD>
</html>
